﻿using System;
using System.Collections.Generic;
using System.Threading;
using ImageConverter.Utils;

namespace ImageConverter.Data.Containers
{
    public interface IEntryReader
    {
        event OnEntryReadHandler OnEntryRead;
        event OnEntryReadErrorHandler OnEntryReadError;

        bool ValidateEntries(string fileName);
        ContainerResult ExtractEntries(string fileName, CancellationToken cancellationToken, PauseToken pauseToken);
        IEnumerable<string> GetArchiveEntries(string fileName);
    }

    public delegate void OnEntryReadHandler(EntryData data);
    public delegate void OnEntryReadErrorHandler(string entryName, Exception ex);
}
